<?php
/**
 * Created by PhpStorm.
 * User: 刘翰文
 * Date: 2019/5/17
 * Time: 14:21
 */

namespace app\api\model;


class Chat extends BaseModels
{
    protected $autoWriteTimestamp='datetime';

    function log(){
        return $this->hasMany('ChatLog','chat_id','id');
    }

    function doctor(){
        return $this->hasOne('Doctor','id','doctor_id');
    }

    function user(){
        return $this->hasOne('Useris','id','user_id');
    }

}